import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/my_collect_entity.dart';

MyCollectEntity $MyCollectEntityFromJson(Map<String, dynamic> json) {
	final MyCollectEntity myCollectEntity = MyCollectEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		myCollectEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		myCollectEntity.msg = msg;
	}
	final MyCollectData? data = jsonConvert.convert<MyCollectData>(json['data']);
	if (data != null) {
		myCollectEntity.data = data;
	}
	return myCollectEntity;
}

Map<String, dynamic> $MyCollectEntityToJson(MyCollectEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

MyCollectData $MyCollectDataFromJson(Map<String, dynamic> json) {
	final MyCollectData myCollectData = MyCollectData();
	final String? currentPage = jsonConvert.convert<String>(json['current_page']);
	if (currentPage != null) {
		myCollectData.currentPage = currentPage;
	}
	final List<MyCollectDataData>? data = jsonConvert.convertListNotNull<MyCollectDataData>(json['data']);
	if (data != null) {
		myCollectData.data = data;
	}
	final String? total = jsonConvert.convert<String>(json['total']);
	if (total != null) {
		myCollectData.total = total;
	}
	return myCollectData;
}

Map<String, dynamic> $MyCollectDataToJson(MyCollectData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['current_page'] = entity.currentPage;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	data['total'] = entity.total;
	return data;
}

MyCollectDataData $MyCollectDataDataFromJson(Map<String, dynamic> json) {
	final MyCollectDataData myCollectDataData = MyCollectDataData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		myCollectDataData.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		myCollectDataData.title = title;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		myCollectDataData.image = image;
	}
	final String? logo = jsonConvert.convert<String>(json['logo']);
	if (logo != null) {
		myCollectDataData.logo = logo;
	}
	final String? saveNum = jsonConvert.convert<String>(json['save_num']);
	if (saveNum != null) {
		myCollectDataData.saveNum = saveNum;
	}
	final String? price = jsonConvert.convert<String>(json['price']);
	if (price != null) {
		myCollectDataData.price = price;
	}
	return myCollectDataData;
}

Map<String, dynamic> $MyCollectDataDataToJson(MyCollectDataData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['image'] = entity.image;
	data['logo'] = entity.logo;
	data['save_num'] = entity.saveNum;
	data['price'] = entity.price;
	return data;
}